﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class TestRigidbodyMove : MonoBehaviour
{
    private Rigidbody m_rigidbody;

    // Start is called before the first frame update
    void Start()
    {
        m_rigidbody = gameObject.GetComponent<Rigidbody>();
    }

    // Update is called once per frame
    void Update()
    {
        if (Input.GetKey(KeyCode.Q))
        {
            m_rigidbody.MovePosition(m_rigidbody.position + Vector3.left * 5 * Time.deltaTime);
        }
        if (Input.GetKey(KeyCode.E))
        {
            m_rigidbody.MovePosition(m_rigidbody.position + Vector3.right * 5 * Time.deltaTime);
        }
    }
}
